package org.lanqiao.util;
import org.springframework.stereotype.Component;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionListener;
import java.util.HashMap;

@Component
public class SessionListener implements HttpSessionListener {
    public static HashMap<String,HttpSession> sessionMap = new HashMap<String,HttpSession>();

    public static void sessionCreated(HttpSession session,String name)
    {
        sessionMap.put(name,session);
    }

    public static void sessionDestroyed(String name)
    {
        sessionMap.remove(name);
    }

}
